package cn.sanch.org.mapper;

import cn.sanch.basic.mapper.BaseMapper;
import cn.sanch.org.domain.Employee;
import cn.sanch.org.query.EmployeeQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author sanch37
 * 2022/5/23
 */
public interface EmployeeMapper extends BaseMapper<Employee> {

    /**
     * 添加中间表t_employee_role数据
     * @param id
     * @param role_id
     */
    void addEmployeeRole(@Param("id") Long id, @Param("role_id") Long role_id);

    /**
     * 删除中间表t_employee_role数据
     * @param id
     */
    void delEmployeeRoleByEmployeeId(Long id);

    /**
     * 通过Logininfo对象Id查找Employee对象
     * @param id
     * @return
     */
    Employee loadByLogininfoId(Long id);

    /**
     * 根据店铺id查询改店铺的所有店员
     * @param shopId
     * @return
     */
    List<Employee> list(Long shopId);
}
